package com.cskaoyan.service.Zyl_Shopping_cart_Service;

import com.cskaoyan.bean.marketBean.*;
import com.cskaoyan.mapper.marketMapper.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
@Service
public class MarketCartService_zylImpl implements MarketCartService_zyl{

    @Autowired
    MarketCartMapper marketCartMapper;
    @Autowired
    MarketAddressMapper marketAddressMapper;
    @Autowired
    MarketCouponUserMapper marketCouponUserMapper;
    @Autowired
    MarketCouponMapper marketCouponMapper;

    @Autowired
    MarketOrderMapper MarketOrderMapper;

    @Autowired
    MarketGrouponRulesMapper marketGrouponRulesMapper;

    @Autowired
    MarketGoodsProductMapper marketGoodsProductMapper;

    @Autowired
    MarketGoodsMapper marketGoodsMapper;

    @Autowired
    MarketUserMapper marketUserMapper;


    @Override
    public List<MarketCart> selectByExample_zyl(Integer id, Boolean deleted) {
        return marketCartMapper.selectByExample_zyl(id, deleted);
    }

    @Override
    public int insert(MarketUser record) {
        return marketUserMapper.insert(record);
    }

    @Override
    public List<MarketUser> selectByExample(MarketUserExample example) {
        return marketUserMapper.selectByExample(example);
    }

    @Override
    public long countByExample(MarketCartExample example) {
        return marketCartMapper.countByExample(example);
    }

    @Override
    public MarketGoods selectByPrimaryKey_zyl(Integer id) {
        return marketGoodsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insert(MarketCart record) {
        return marketCartMapper.insert(record);
    }

    @Override
    public MarketGoodsProduct select_zyl(Integer id, Integer goodsId) {
        return marketGoodsProductMapper.select_zyl(id, goodsId);
    }

    @Override
    public int deleteByExample(MarketCartExample example) {
        return marketCartMapper.deleteByExample(example);
    }

    @Override
    public MarketGrouponRules select_zyl(Integer goods_id) {
        return marketGrouponRulesMapper.select_zyl(goods_id);
    }

    @Override
    public List<MarketOrder> selectByExample(MarketOrderExample example) {
        return MarketOrderMapper.selectByExample(example);
    }

    @Override
    public MarketCoupon selectByPrimaryKey_zyl_coupon(Integer id) {
        return marketCouponMapper.selectByPrimaryKey(id);
    }

    @Override
    public MarketCouponUser selectByPrimaryKey_zyl_couponuser(Integer id) {
        return marketCouponUserMapper.selectByPrimaryKey(id);
    }

    @Override
    public MarketAddress selectByPrimaryKey(Integer id) {
        return marketAddressMapper.selectByPrimaryKey(id);
    }

    @Override
    public int update_zyl(BigDecimal productId, Integer goodsId, Short number, Integer id,Integer userId) {
        return marketCartMapper.update_zyl(productId, goodsId, number, id, userId);
    }

    @Override
    public int updateByExample(MarketCart record, MarketCartExample example) {
        return marketCartMapper.updateByExample(record, example);
    }

    @Override
    public int updateMarketCart_zyl(Integer id, Integer checked ,Integer userId) {
        return marketCartMapper.updateMarketCart_zyl(id,checked,userId);
    }

    @Override
    public int updateByPrimaryKey(MarketCart record) {
        return marketCartMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<MarketCart> selectByExample(MarketCartExample example) {
        return marketCartMapper.selectByExample(example);
    }
}
